#ifndef BSP_H
#define BSP_H
#include "types.h"
#include "avr\io.h"
#include "avr\interrupt.h"

//#include "avr\pgmspace.h"
//#include "avr\sleep.h"
//#include "util\delay.h"
//#include "avr\power.h"
//#include "stdlib.h"
//#include "avr\eeprom.h"
//#include "PRODUCTIONTEST.H"

#define SEI() asm("sei")
#define CLI() asm("cli")
#define NOP() asm("nop")

#define ENTER_CRITICAL()   CLI()
#define EXIT_CRITICAL()   SEI()

////////////////////////////////LED definition /////////////////////////////////
#define YLED_ON() { DDRB |= (1<<1); PORTB |= (1<<1); }
#define YLED_OFF() { DDRB |= (1<<1); PORTB &= (~(1<<1)); }
#define YLED_FLASH() { DDRB |= (1<<1); PORTB ^= (1<<1); }
#define GLED_ON() { DDRB |= (1<<2); PORTB |= (1<<2); }
#define GLED_OFF() { DDRB |= (1<<2); PORTB &= (~(1<<2)); }
#define GLED_FLASH() { DDRB |= (1<<2); PORTB ^= (1<<2); }


//////////////////////Varialbes to EXTERN///////////////////////////////
extern volatile UINT8 g_TimeDelay;

//////////////////////functions to EXTERN///////////////////////////////
void PortInit( void );
void Timer0Init( void );
void ExternIntInit( void );
void BSPInit( void );




#endif
